package sajat.onlab;

import java.util.ArrayList;

import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;

public class ViewPagerAdapter extends FragmentPagerAdapter{
	
	private ArrayList<Fragment> fragmentlist = new ArrayList<Fragment>();
	private int count;

	public ViewPagerAdapter(FragmentManager fm, int count) {
		super(fm);
		this.count = count;
	}

	@Override
	public int getCount() {
		return count;
	}

	@Override
	public Fragment getItem(int arg0) {
		return fragmentlist.get(arg0);
	}
	
	public void addFragment(Fragment fr) {
		fragmentlist.add(fr);
	}


}
